package me.yushuai.wukong.base.repository;

import me.yushuai.wukong.base.entity.WorkingArea;
import me.yushuai.wukong.common.persistence.repository.BaseRepository;
import org.springframework.data.jpa.repository.Query;

import javax.persistence.metamodel.StaticMetamodel;
import java.util.Optional;

/**
 * @author zhoushuai@189.cn
 * @since 2022-11-10
 */
public interface WorkingAreaRepository extends BaseRepository<WorkingArea, Long> {

//    @StaticMetamodel()

    @Query("from WorkingArea where bizId = ?1")
    Optional<WorkingArea> findByBizId(String bizId);

    @Query("from WorkingArea where bizId = ?1")
    Boolean existsByBizId(String bizId);

}
